<?php
class book {
	private $id;
	private $name;
	private $author;
	private $averagePoints;
	private $visits;
	private $price;
	private $stock;
	private $picture;
	
	/*
	 * Constructor
	 */
	function __construct() {
		$this->id=$id;
		$this->name=$name;
		$this->author=$author;
		$this->averagePoints=$averagePoints;
		$this->visits=$visits;
		$this->price=$price;
		$this->stock=$stock;
		$this->picture=$picture;
		
	}
	
	public function get_id(){
		return $this->id;
	}
	
	

	public function retriveBookList(){
		$filename="C:/xampp/htdocs/librejo/trunk/WEB/books.txt";
		$fp = fopen("$filename", "r");
		while (!feof($fp)) {
			$line=fgets($fp);
			$info = explode('|', $line);
			echo '<tr>
			    	<td>'
					.$info[1].
					'</td>
				  </tr>';
			}
  			
	}
}
?>